Example: Relational Merge
Select the two datasets that you want to merge at the point/s of relation - i.e. where the values are common to the mapped fields of both datasets. Configure which fields from each component dataset will be included in the merged dataset, and how you wish to present the merged dataset.
A new dataset is created, containing rows and fields as specified during configuration. Mapped fields from both component datasets with common values will be merged at the point of relation. How the created dataset is presented is determined during configuration.
Example 1: Matched rows
Initial dataset 1:
Initial dataset 2:
Configuration:
Selected mappings:
-
-
Integer2 mapped to Integer2
-
String2 mapped to String2
-
Merged results: Matched rows
Fields selected from dataset 1: All
Fields selected from dataset 2: All
Resulting dataset:
Only Dataset 1, row 3 has values in common with Dataset 2, row 1 in both the mapped fields Integer2 and String2 - 33 and CC.
While the value 55 is common to both datasets in the mapped Interger2 fields, there is no common value in the mapped String2 fields, and so these rows are not included in the new dataset.
Example 2: Unmatched rows, all
Initial dataset 1:
Initial dataset 2:
Configuration:
Selected mappings: Integer2 mapped to Integer2
Merged results: Unmatched rows: all
Fields selected from dataset 1: All
Fields selected from dataset 2: All
Resulting dataset:
Rows containing the common values of 33, 55 and 66 in the fields Interger2 have been excluded.
Example 3: Unmatched rows: 1st table
Initial dataset 1:
Initial dataset 2:
Configuration:
Selected mappings: Integer2 mapped to Integer2
Merged results: Unmatched rows: 1st table
Fields selected from dataset 1: All
Fields selected from dataset 2: All
Resulting dataset:
Only fields with values unique to Dataset 1, Integer2 are included.
Example 4: Unmatched rows: 2nd table
Initial dataset 1:
Initial dataset 2:
Configuration:
Selected mappings: Integer2 mapped to Integer2
Merged results: Unmatched rows: 2nd table
Fields selected from dataset 1: All
Fields selected from dataset 2: All
Resulting dataset:
Only fields with values unique to Dataset 1, Integer2 are included.
Example 5: All rows
Initial dataset 1:
Initial dataset 2:
Configuration:
Selected mappings: Integer2 mapped to Integer2
Merged results: All rows
Fields selected from dataset 1: All
Fields selected from dataset 2: All
Resulting dataset:
Note that the row in Dataset 1, Integer 2, value = 55 is repeated when merged with each of the value = 55 in Dataset 2.
Related topics: